package com.hd.hdxgddcommon.constant;


/**
 * <p>
 * 返回结果常量
 * </p>
 *
 * @author Administrator
 * @since 2019-03-11
 */
public enum ResultConst {
    SUCCESS(1, "成功", "操作成功"),
    FAIL(0, "失败", "操作失败"),
    LOGIN_FAIL(0, "登录失败", "登录失败"),
    UNAUTHENTIC(-1, "未认证", "请登录认证!"),
    UNAUTHORIZED(0, "未授权", "您没有权限!"),
    UN_ROOT(0, "非ROOT管理员", "非ROOT管理员!"),
    INVALID_PATH(0, "404错误", "请求路径无效!"),
    ILLEGAL_PARAM(0, "400错误", "请求参数错误!"),
    SERVICE_EXCEPTION(0, "500错误", "服务器异常!"),
    UNKNOWN_EXCEPTION(0, "未知错误", "服务器发生未知错误!"),
    XSS(0, "未知错误", "请求中含有xss攻击!");
    //状态码
    private int code;
    //结果描述
    private String desc;
    //提示信息
    private String msg;

    ResultConst(int code, String desc, String msg) {
        this.code = code;
        this.desc = desc;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
